-- GENERATED SPELL FOR [Bloodwarder Slayer] --


function spell0_19167(pUnit, Event) --@Mortal Strike,n/a--
pUnit:FullCastSpellOnTarget(15708,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19167', 5350, 1)
end

function spell1_19167(pUnit, Event) --@Solar Strike,n/a--
pUnit:FullCastSpellOnTarget(35189,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19167', 5345, 1)
end

function spell2_19167(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(15589,pUnit)
pUnit:RegisterEvent('Sorts_19167', 563, 1)
end

function spell3_19167(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(13736,pUnit)
pUnit:RegisterEvent('Sorts_19167', 2000, 1)
end

function Sorts_19167(pUnit, Event)
local choix_sorts_19167 = math.random(0, 3)
if choix_sorts_19167 == 0 then
pUnit:RegisterEvent('spell0_19167', 1, 1)
end
if choix_sorts_19167 == 1 then
pUnit:RegisterEvent('spell1_19167', 1, 1)
end
if choix_sorts_19167 == 2 then
pUnit:RegisterEvent('spell2_19167', 1, 1)
end
if choix_sorts_19167 == 3 then
pUnit:RegisterEvent('spell3_19167', 1, 1)
end
end

function mob19167_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_19167', math.random(1500, 3000), 1)
end

function mob19167_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19167_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19167_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(19167, 1, 'mob19167_Action')
RegisterUnitEvent(19167, 2, 'mob19167_Leave')
RegisterUnitEvent(19167, 3, 'mob19167_Kill')
RegisterUnitEvent(19167, 4, 'mob19167_Die')
